home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility2 / wine02bx.zip / LISP / COMINT / INF-LISP.ELC < prev    next >
Text File  |  1993-03-28  |  7KB  |  107 lines

  1. ;;; compiled by jwz@thalidomide on Thu Jul  2 14:39:20 1992
  2. ;;; from file /u/jwz/emacs19/lisp/comint/inf-lisp.el
  3. ;;; emacs version 19.2.1 Lucid.
  4. ;;; bytecomp version 2.07; 17-jun-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (byte-code "└┴!ê┬├!ç" [require comint provide inf-lisp] 2)
  14. (defvar lisp-filter-regexp "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'" "\
  15. *What not to save on inferior Lisp's input history
  16. Input matching this regexp is not saved on the input history in lisp
  17. mode. Default is whitespace followed by 0 or 1 single-letter :keyword 
  18. (as in :a, :c, etc.)")
  19. (byte-code "└    ┬├#ê└    ─┼#ê└    ╞╟#ê└    ╚╔#ê└    ╩╦#ê└    ╠═#ê╬╧!¼â╨¼ö╤!╙\"ê└╒╓#ê╨ç" [define-key lisp-mode-map "" lisp-load-file " " lisp-compile-file "ÿ" lisp-eval-defun "" lisp-eval-region "" lisp-compile-defun "" lisp-compile-region boundp inferior-lisp-mode-map nil copy-keymap shared-lisp-mode-map set-keymap-parent comint-mode-map "" lisp-send-defun] 4)
  20. (defvar inferior-lisp-program "lisp" "\
  21. *Program name for invoking an inferior Lisp with `lisp'.
  22. Optionally, a list of strings the car of which is the programme to run
  23. and the cdr of which is command line arguments desired.")
  24. (defvar inferior-lisp-load-command "(load \"%s\")\n" "\
  25. *Format-string for building a Lisp expression to load a file.
  26. This format string should use %s to substitute a file name
  27. and should result in a Lisp expression that will command the inferior Lisp
  28. to load that file.  The default works acceptably on most Lisps.
  29. The string \"(progn (load \\\"%s\\\" :verbose nil :print t) (values))\\
  30. \"
  31. produces cosmetically superior output for this application,
  32. but it works only in Common Lisp.")
  33. (defvar inferior-lisp-prompt "^[^> ]*>+:? *" "\
  34. Regexp to recognise prompts in the inferior Lisp.
  35. Defaults to \"^[^> ]*>+:? *\", which works pretty good for Lucid, kcl,
  36. and franz. This variable is used to initialise comint-prompt-regexp in the 
  37. lisp buffer.
  38.  
  39. More precise choices:
  40. Lucid Common Lisp: \"^\\(>\\|\\(->\\)+\\) *\"
  41. franz: \"^\\(->\\|<[0-9]*>:\\) *\"
  42. kcl: \"^>+ *\"")
  43. (defvar inferior-lisp-mode-hook nil "\
  44. *Hook for customising lisp mode")
  45. (fset 'inferior-lisp-mode #[nil "└ ê┴\n!ê├┼╔\n╦ ═╧╨!ê╤╥!ç" [comint-mode use-local-map inferior-lisp-mode-map inferior-lisp-mode major-mode "Inferior Lisp" mode-name inferior-lisp-prompt comint-prompt-regexp inferior-lisp-get-old-input comint-get-old-input inferior-lisp-input-filter comint-input-filter ignore comint-input-sentinel lisp-mode-variables t run-hooks inferior-lisp-mode-hook] 2 "\
  46. Major mode for interacting with an inferior Lisp process.  
  47. Runs a Lisp interpreter as a subprocess of Emacs, with Lisp I/O through an
  48. Emacs buffer.  Variable inferior-lisp-program controls which Lisp interpreter
  49. is run.  Variables inferior-lisp-prompt, lisp-filter-regexp and
  50. inferior-lisp-load-command can customize this mode for different Lisp
  51. interpreters.
  52.  
  53. \\{inferior-lisp-mode-map}
  54.  
  55. Customization: Entry to this mode runs comint-mode-hook and lisp-mode-hook,
  56. in that order.
  57.  
  58. You can send text to the inferior Lisp process from other buffers containing
  59. Lisp source.  
  60.     lisp-eval-defun sends the current defun to the Lisp process.
  61.     lisp-compile-defun compiles the current defun.
  62.     lisp-eval-region sends the current region to the Lisp process.
  63.     lisp-compile-region compiles the current region.
  64.  
  65. Commands:
  66. Return after the end of the process' output sends the text from the 
  67.     end of process to point.
  68. Return before the end of the process' output copies the sexp ending at point
  69.     to the end of the process' output, and sends it.
  70. Delete converts tabs to spaces as it moves back.
  71. Tab indents for Lisp; with argument, shifts rest
  72.     of expression rigidly with the current line.
  73. C-M-q does Tab on each line starting within following expression.
  74. Paragraphs are separated only by blank lines.  Semicolons start comments.
  75. If you accidentally suspend your process, use \\[comint-continue-subjob]
  76. to continue it." nil])
  77. (fset 'inferior-lisp-get-old-input #[nil "è`┴ ê`{*ç" [end backward-sexp] 2 "\
  78. Snarf the sexp ending at point"])
  79. (fset 'inferior-lisp-input-filter #[(str) "└    \n\"?ç" [string-match lisp-filter-regexp str] 3 "\
  80. Don't save anything matching lisp-filter-regexp"])
  81. (fset 'run-lisp #[nil "┴┬├!ë<½ëA@ ½ç╟ !╚>¼ì╔╩╦┴%qê╠ ê+═├!ç" [inferior-lisp-program nil get-buffer-process "*lisp*" proc switches prog process-status (run stop) apply make-comint "lisp" inferior-lisp-mode switch-to-buffer] 7 "\
  82. Run an inferior Lisp process, input and output via buffer *lisp*.
  83. If there is a process already running in *lisp*, just switch to that buffer.
  84. Takes the program name from the variable inferior-lisp-program.
  85. (Type \\[describe-mode] in the process buffer for a list of commands.)" nil])
  86. (fset 'lisp-eval-region #[(start end) "└┴!├─┼\n!\"\n½ç╟\n!╚>¼à╔╩!¬¥╦ ╬╧%ê╨\n├\"\"ê╨\n├╥\"\"*ç" [get-buffer-process "*lisp*" proc format "/tmp/eme%d.lisp" process-id filename process-status (run stop) error "No current lisp process" write-region start end nil nomessage send-string inferior-lisp-load-command "(delete-file %s)\n"] 6 "\
  87. Send the current region to the inferior Lisp process." "r"])
  88. (fset 'lisp-eval-defun #[nil "è└ ê`┬ ê├`    \"*ç" [end-of-defun end beginning-of-defun lisp-eval-region] 3 "\
  89. Send the current defun to the inferior Lisp process." nil])
  90. (fset 'lisp-compile-region #[(start end) "└┴!├─┼\n!\"\n½ç╟\n!╚>¼à╔╩!¬ó╦╠{╧Q╨╨╤%ê╥\n├\"\"ê╥\n├╘\"\"*ç" [get-buffer-process "*lisp*" proc format "/tmp/emc%d.lisp" process-id filename process-status (run stop) error "No current lisp process" write-region "(funcall (compile nil `(lambda () (progn 'compile " start end "))))\n" nil nomessage send-string inferior-lisp-load-command "(delete-file %s)\n"] 6 "\
  91. Compile the current region in the inferior Lisp process." "r"])
  92. (fset 'lisp-compile-defun #[nil "è└ ê`┬ ê├`    \"*ç" [end-of-defun e beginning-of-defun lisp-compile-region] 3 "\
  93. Compile the current defun in the inferior Lisp process." nil])
  94. (defvar lisp-prev-l/c-dir/file nil "\
  95. Saves the (directory . file) pair used in the last lisp-load-file or
  96. lisp-compile-file command. Used for determining the default in the 
  97. next one.")
  98. (defvar lisp-source-modes '(lisp-mode) "\
  99. *Used to determine if a buffer contains Lisp source code.
  100. If it's loaded into a buffer that is in one of these major modes, it's
  101. considered a lisp source file by lisp-load-file and lisp-compile-file.
  102. Used by these commands to determine defaults.")
  103. (fset 'lisp-load-file #[(file-name) "└    !ê┬    !├    !B┼╞╟    \"\"ç" [comint-check-source file-name file-name-directory file-name-nondirectory lisp-prev-l/c-dir/file send-string "lisp" format inferior-lisp-load-command] 5 "\
  104. Load a lisp file into the inferior Lisp process." (comint-get-source "Load Lisp file: " lisp-prev-l/c-dir/file lisp-source-modes nil)])
  105. (fset 'lisp-compile-file #[(file-name) "└    !ê┬    !├    !B┼╞╟    ╚Q\"ç" [comint-check-source file-name file-name-directory file-name-nondirectory lisp-prev-l/c-dir/file send-string "lisp" "(compile-file \"" "\")\n"] 5 "\
  106. Compile a Lisp file in the inferior Lisp process." (comint-get-source "Compile Lisp file: " lisp-prev-l/c-dir/file lisp-source-modes nil)])
  107.